import React from 'react'

export default function Child1({num,setUsername}:any) {
  return (
    <div>Child1
        <h3>来自父组件的数据为{num}</h3>
        <button onClick={()=>{
            setUsername(num+15);
        }}>修改父组件的数据</button>
    </div>
  )
}
